added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / CSASPNETOutputCache / OutputCacheWithControl.aspx
blob8bf6950f97aa7f2433ba8979528b72d059c99be1
1 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OutputCacheWithControl.aspx.cs"
2     Inherits="CSASPNETOutputCache.OutputCacheWithControl" %>
4 <%@ OutputCache Duration="1000" VaryByControl="ddlOption" %>
5 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6 <html xmlns="http://www.w3.org/1999/xhtml">
7 <head runat="server">
8     <title>OutPutCacheWithVaryByControl</title>
9 </head>
10 <body>
11     <form id="form1" runat="server">
12     <div>
13         <asp:Label ID="lblResult" runat="server"></asp:Label>
14         <br />
15         <br />
16         <asp:DropDownList ID="ddlOption" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlOption_SelectedIndexChanged">
17             <asp:ListItem Selected="True">Option One</asp:ListItem>
18             <asp:ListItem>Option Two</asp:ListItem>
19             <asp:ListItem>Option Three</asp:ListItem>
20         </asp:DropDownList>
21         <p>
22             The page will be rendered from cache basing on the selected item of DropDownList. 
23             The different item has corresponding cache. 
24         </p>
25     </div>
26     <asp:HyperLink ID="HyperLink5" runat="server" NavigateUrl="~/Default.aspx">Back To Default Page</asp:HyperLink>
27     </form>
28 </body>
29 </html>